Skip to content

PR-118: add pathing metadata; fix metatype bug#118

Merged
cnuernber merged 1 commit into
clj-python:masterfrom
jjtolton:ISSUE-116/python-source-location
Sep 7, 2020
Merged

PR-118: add pathing metadata; fix metatype bug#118
cnuernber merged 1 commit into
clj-python:masterfrom
jjtolton:ISSUE-116/python-source-location

Conversation

@jjtolton
Copy link
Copy Markdown
Contributor

@jjtolton jjtolton commented Sep 4, 2020

Closes: #116

Editors that support "jump to source" can now jump to source using the metadata of Python functions, classes, modules, and methods instantiated via require-python.

Additionally, discovered a bug that prevented socket.SocketIO from being interned with require-python, since it is neither a Python module nor Python type (it is an abc.meta). Put a generic exception wrapper with handling for metatypes.

jumpToSource

@jjtolton jjtolton changed the title add pathing metadata; fix metatype bug PR-118: add pathing metadata; fix metatype bug Sep 4, 2020
@jjtolton jjtolton marked this pull request as ready for review September 4, 2020 01:32
@jjtolton
Copy link
Copy Markdown
Contributor Author

jjtolton commented Sep 4, 2020

my laptop was melting down while recording that GIF ... the jumps aren't normally that slow 🤕

Comment thread src/libpython_clj/metadata.clj
(defn py-class-argspec [class]
(let [constructor (py/get-attr class "__init__")]
(py-fn-argspec constructor)))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function was defined (the same way) twice for some reason, so I removed the later one.

@cnuernber cnuernber merged commit a85be74 into clj-python:master Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ISSUE-116: Add Python module and line # information to allow for "jump to source" navigation

2 participants